A digital image is a representation of a two-dimensional (2D) numerical data on a regular grid. In general, a digital image has a rectangular or square shape and comprises a plurality of pixels. Each pixel can be represented by a color p, which represent data value, and a coordinate (x, y), which represents grid. Image can be stored in various formats (e.g., JPEG, PNG, BMP) and displayed on different applications. For example, JPEG image is preferred to display images on website. PNG image is preferred for multiple image blending due to its transparency options. BMP image which contains raw 2D raster data is appropriate for computer processing.
Digital images often need to be resized for display devices with different aspect ratios or different resolutions. Currently, there are several techniques widely used for resizing images. These techniques include, for example, scaling, cropping, and seam carving. Resizing images using scaling is often not sufficient since it will result in the distortions of the input image if it is scaled not proportionally (i.e., the aspect ratio of the image is changed). Cropping is also of limited use since it will discard certain information of the input image. Seam carving techniques alter the dimensions of an image by removing pixels from the image or adding pixels to the image that are considered to be less important than other pixels of the image (e.g., based on a pixel's value as compared to the value of its neighbors). However, seam carving techniques may be computationally expensive and may also produce undesirable artifacts or distortions.
Therefore, a method for resizing an image without unnatural distortion or content loss is needed.